home *** CD-ROM | disk | FTP | other *** search
/ Amoszine 4 / Amoszine 4 (Disk 2 of 3).adf / Intuition_Procs / intui.lha / Demo_3.Amos / Demo_3.amosSourceCode
AMOS Source Code  |  1992-02-26  |  2KB  |  80 lines

  1. ' Demo of OpenScreen, CloseScreen, SetBPen, ClearScreen
  2. ' note that during the demo the drag bar and back/front gadgets may be used
  3. '
  4. Amos To Back 
  5. '
  6. Wait 50
  7. '
  8. _OPENSCREEN[0,0,320,200,5,0,1,2,15,0,0,0,""]
  9. '
  10. For N=0 To 31
  11.    '
  12.    _SETBPEN[_IS,Rnd(N)]
  13.    _CLEARSCREEN[_IS]
  14.    '
  15.    Wait 10
  16.    '
  17. Next 
  18. '
  19. _CLOSESCREEN[_IS]
  20. '
  21. Wait 50
  22. '
  23. Amos To Front 
  24. '
  25. Edit 
  26. '
  27. Procedure _OPENSCREEN[X,Y,W,H,D,F,B,V,S,C,G,M,T$]
  28.    
  29.    Global _IS
  30.    
  31.    T$=T$+Chr$(0)
  32.    
  33.    Reserve As Work 10,32
  34.    
  35.    A=Start(10)
  36.    
  37.    Doke A,X : Add A,2 : Rem                             -- x_pos:  
  38.    Doke A,Y : Add A,2 : Rem                             -- y_pos:  
  39.    Doke A,W : Add A,2 : Rem                             -- width:  
  40.    Doke A,H : Add A,2 : Rem                             -- height: 
  41.    Doke A,D : Add A,2 : Rem                             -- depth:  
  42.    Poke A,F : Add A,1 : Rem                             -- detail_pen: 
  43.    Poke A,B : Add A,1 : Rem                             -- block_pen:  
  44.    Doke A,V : Add A,2 : Rem                             -- view_modes: 
  45.    Doke A,S : Add A,2 : Rem                             -- screen_type:  
  46.    Loke A,C : Add A,4 : Rem                             -- font: 
  47.    Loke A,Varptr(T$) : Add A,4 : Rem                    -- title:   
  48.    Loke A,G : Add A,4 : Rem                             -- gadgets:  
  49.    Loke A,M : Rem                                       -- bitmap:     
  50.    
  51.    Areg(0)=Start(10)
  52.    
  53.    _IS=Intcall(-198)
  54.    
  55.    Erase 10
  56.    
  57. End Proc
  58. Procedure _CLOSESCREEN[_IS]
  59.    
  60.    Areg(0)=_IS : Rem     -- Screen Handle In A0 
  61.    
  62.    NULL=Intcall(-66)
  63.    
  64. End Proc
  65. Procedure _SETBPEN[_IS,C]
  66.    
  67.    Areg(1)=_IS+84
  68.    
  69.    Dreg(0)=C
  70.    
  71.    P=Gfxcall(-348)
  72.    
  73. End Proc
  74. Procedure _CLEARSCREEN[_IS]
  75.    
  76.    Areg(1)=_IS+84 : Rem     -- Rastport in A1      
  77.    
  78.    NULL=Gfxcall(-48)
  79.    
  80. End Proc